package demo.wint.web.action;

import wint.mvc.flow.FlowData;
import wint.mvc.module.annotations.Action;
import wint.mvc.parameters.Arguments;
import wint.mvc.template.Context;

public class Hello {
	
	public void say(Context context, FlowData flowData, int first, int second) {
		Arguments argments = flowData.getArguments();
		System.out.println(argments);
		
		System.out.println(first);
		System.out.println(second);
		
		context.put("first", first + 100);
		context.put("second", aaa(first, second));
	}
	
	private int aaa(int a, int b) {
		return a * 100 + b * 20;
	}
	
	public void haha(FlowData flowData){
		System.out.println("in haha");
		flowData.redirectTo("http://taobao.com");
		//flowData.sendTo("baseModule", "hello/say").arguments(1, 2, 3).param("id", "567");
	}
	
	@Action
	public String xxxyyy(int a, int b) {
		System.out.println(a);
		System.out.println(b);
		
		return "zzz";
	}

}
